package com.hsd.znsh.entity;

import lombok.Data;
import org.hibernate.annotations.CreationTimestamp;
import org.hibernate.annotations.UpdateTimestamp;
import org.hibernate.validator.constraints.NotBlank;

import javax.persistence.*;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/*
 * @auther: wangjiacai
 *
 * @create: 2018-04-09 10:47:32
 */
@Data
@Entity
@Table(name ="tbl_monitor")
public class Monitor {

    /*主键*/
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    /*探头名称*/
    @NotBlank(message = "探头名称不能为空")
    private String probeName;

    /*探头编号*/
    @NotNull(message = "探头编号不能为空")
    private Integer probeIndex;

    /*序列号*/
    @NotBlank(message = "序列号不能为空")
    private String monitorSn;

    /*监控机类型*/
    @NotNull(message = "类型不能为空")
    private Integer monitorType;

    /*视频流地址(PC端访问)*/
    @NotBlank(message = "视频流地址不能为空")
    private String videoStreamAddress;

    /*别名*/
    private String alias;

    /*验证码*/
    @NotBlank(message = "验证码不能为空")
    private String code;

    /*线路*/
    @NotBlank(message = "线路不能为空")
    private String line;

    /*NVR端口地址*/
    @NotBlank(message = "NVR端口地址不能为空")
    private String nvr;

    /*萤石视频流畅地址*/
    private String hls;

    /*萤石视频高清地址*/
    private String hlsHd;

    /*主机id*/
    private Integer hostId;

    /*创建人id*/
    private Integer createUserId;

    /*创建时间*/
    @CreationTimestamp
    @Temporal(TemporalType.TIMESTAMP)
    private Date createDateTime;

    /*修改时间*/
    @UpdateTimestamp
    @Temporal(TemporalType.TIMESTAMP)
    private Date updateDateTime;

    /*在地图上的left值*/
    @NotNull(message = "在地图上的坐标不能为空")
    private Double leftValue;

    /*在地图上的top值*/
    @NotNull(message = "在地图上的坐标不能为空")
    private Double  topValue;
}
